package cn.edu.lingnan.config;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


public class WebHandlerConfig implements WebMvcConfigurer {

    @Override
    //这个方法用来注册拦截器
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new HandlerInterceptorConfig())
                .addPathPatterns("/**")
                .excludePathPatterns("/")
                .excludePathPatterns("/static/**")
                .excludePathPatterns("/user/getNumCode")
                .excludePathPatterns("/user/login");
    }
}
